<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>卡号管理-批量导入卡号</title>
<link href="/zhenze/Public/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="/zhenze/Public/admin/js/jquery.js"></script>

<link href="/zhenze/Public/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/zhenze/Public/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="/zhenze/Public/validform/Validform_Datatype.js"></script>

<link href="/zhenze/Public/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/zhenze/Public/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="/zhenze/Public/admin/js/select-ui.min.js"></script>

<link rel="stylesheet" href="/zhenze/Public/kindeditor/themes/default/default.css" />
<script type="text/javascript" src="/zhenze/Public/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="/zhenze/Public/kindeditor/lang/zh-CN.js"></script>

<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
	var uploadbutton = K.uploadbutton({
		button : K('#uploadButton')[0],
		fieldName : 'imgFile',
		url : '<?php echo U('kindeditor/upload_json',array('dir'=>file));?>',
		afterUpload : function(data) {
			if (data.error === 0) {
				var url = K.formatUrl(data.url, 'domain');
				K('#file').val(url);
			} else {
				alert(data.message);
			}
		},
		afterError : function(str) {
			alert('自定义错误信息: ' + str);
		}
	});
	uploadbutton.fileBox.change(function(e) {
		uploadbutton.submit();
	});
});
</script>
</head>

<body style="min-width:800px;">
    
    <div class="formbody">
		<form name="myform" id="myform" action="<?php echo U('carbook/leadingin');?>" method="post">
			<ul class="forminfo">
				<li><label>上传导入文件</label><input name="file" id="file" type="text" class="dfinput" value="" readonly   datatype="*" errormsg="文件不能为空！"  nullmsg="请选择上传文件！"/>&nbsp;<input type="button" id="uploadButton" value="上传" /><i class="Validform_checktip"></i></li>
				<li>
					<label>&nbsp;</label><input name="btn" type="submit" class="btn" value="确认保存"/>
					<label>&nbsp;</label><input name="btn" type="button" onclick="moban()" class="btn" value="模板下载"/>
				</li>
			</ul>
		</form>
    </div>

	<script>
	$(function(){
		$("#myform").Validform({
			//tiptype:2
			tiptype:function(msg,o,cssctl){
				var objtip=o.obj.siblings(".Validform_checktip");
				cssctl(objtip,o.type);
				objtip.text(msg);
			}
		});
	}); 
	function moban(){
			if (confirm("你确定要下载模板")){ 
			window.location.href="/zhenze/Public/moban/moban.xlsx" ;
			}
	}
	</script>
</body>

</html>